package sysu.el.array.doubles.algors;

import sysu.el.array.doubles.functors.Fun2Double;

public class ArrFLDouble {
	static public double apply(int arr_num, double[] arr, double init, Fun2Double fun){
		double sum = init;
		for (int i=0; i<arr_num; i++){
			sum = fun.apply(sum, arr[i]);
		}
		return sum;
	}
	
}
